package com.itheima.homework;

import java.util.Scanner;

public class Demo5 {
    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        System.out.println("请输入第一个数:");
        int a = sc.nextInt();
        System.out.println("请输入第二个数:");
        int b = sc.nextInt();
        System.out.println("请输入第三个数:");
        int c = sc.nextInt();
        getMax(a, b, c);

    }

    public static void getMax(int a, int b, int c) {
        int max = (a > b ? a : b) > c ? (a > b ? a : b) : c;
        int min = (a < b ? a : b) < c ? (a < b ? a : b) : c;
        int mid = a + b + c - max - min;
        System.out.println("从大到小的顺序是:" + max + " " + mid + " " + min);
    }

}

